function YearPage(params) {
  this.name = params.name;
  this.word = params.word;
  this.$dom = {
    cursor: $('.cursor'),
    shu: $('.shu'),
    doorStatic: $('.door-static'),
    door: $('.door'),
    light: $('.light'),
    name: $('.sec5 .title'),
    word: $('.sec5 .word'),
    btn: $('.sec5 .btn'),
    generate: $('.sec6 .generate')
  }
}
YearPage.prototype.start = function () {
  this.$dom.name.html(this.name);
  this.$dom.word.text(this.word);
  this.$dom.shu.eq(0).animate({ left: 0 }, 1000)
  this.$dom.shu.eq(1).animate({ right: '220px' }, 1000)
  this.$dom.cursor.animate({ opacity: 1, top: '-110px' }, 1000, () => {
    this.$dom.cursor.addClass('shown')
    this.$dom.shu.addClass('shown')
  });
  this.$dom.doorStatic.on('click', () => {
    this.$dom.doorStatic.hide();
    this.$dom.door.addClass('shown');
    this.$dom.light.addClass('shown');

  })
}

$(function () {
  const page = new YearPage({ name: '山东佳德技术', word: '恭贺新禧·鼠年大吉' });
  page.start()
})